package com.itcg.library.mapper;

import com.itcg.library.pojo.Books;
import com.itcg.library.pojo.BooksPageQuery;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

//操作图书的Mapper接口
@Repository
public interface BooksMapper {

    void insert(Books books);

    void batchDelete(@Param("ids") List<Integer> ids);

    void updates(Books books);

    @Select("select * from books where id =#{id}")
    Books findById(Integer id);

    List<Books> findByConditions(BooksPageQuery booksPageQuery);

    List<Books> findByConditions2(BooksPageQuery booksPageQuery);
}